using System;

namespace AntEater.Runtime.Services
{
    /// <summary>
    /// The runtime service interface defines a common interface for all services.
    /// </summary>
    public interface IRuntimeService
    {
        /// <summary>
        /// Gets a value indicating whether this instance is reusable.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance is reusable; otherwise, <c>false</c>.
        /// </value>
        bool IsReusable {
            get;
        }

        /// <summary>
        /// Gets a value indicating whether this instance is shutdown.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance is shutdown; otherwise, <c>false</c>.
        /// </value>
        bool IsShutdown {
            get;
        }

        /// <summary>
        /// Initializes this instance.
        /// </summary>
        /// <param name="context">The context in which the service is running.</param>
        void Initialize(RuntimeServiceContext context);

        /// <summary>
        /// Shutdowns this instance.
        /// </summary>
        void Shutdown();
    }
}
